package online.longzipeng.householdbillssystem.business.vo.user;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ApiModel(value = "用户新增对象",description = "请求参数类")
public class UserSaveVO {

    @ApiModelProperty(value = "用户名",example = "admin",required = true)
    @NotBlank(message = "用户名不能为空！！")
    private String userName;

    @ApiModelProperty(value = "密码",example = "admin123",required = true)
    @NotBlank(message = "密码不能为空！！")
    private String password;

    @ApiModelProperty(value = "用户名称",example = "小丸子",required = true)
    @NotBlank(message = "用户名称不能为空！！")
    private String nick;

    @ApiModelProperty(value = "年龄",example = "18",required = true)
    @Min(0)
    private Byte age;

    @ApiModelProperty(value = "头像",example = "http://xxx.jpg",required = false)
    private String avatar;

}